import { createRouter, createWebHistory } from 'vue-router'

import BaseLayout from '@/layout/BaseLayout.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      component: BaseLayout,
      redirect: '/IndexView',
      children: [
        {
          path: 'IndexView',
          name: 'IndexView',
          component: () => import('@/views/IndexView.vue')
        },
        {
          path: 'piniaExample',
          name: 'piniaExample',
          component: () => import('@/views/piniaExample.vue')
        },
        {
          path: 'slotExample',
          name: 'slotExample',
          component: () => import('@/views/slotExample.vue')
        }
      ]
    }
  ]
})

export default router
